Linear-Time Pointer-Machine Algorithms for Path-Evaluation Problems on Trees and Graphs
نویسندگان
چکیده
We present algorithms that run in linear time on pointer machines for a collection of problems, each of which either directly or indirectly requires the evaluation of a function defined on paths in a tree. These problems previously had linear-time algorithms but only for random-access machines (RAMs); the best pointer-machine algorithms were super-linear by an inverse-Ackermann-function factor. Our algorithms are also simpler, in some cases substantially, than the previous linear-time RAM algorithms. Our improvements come primarily from three new ideas: a refined analysis of path compression that gives a linear bound if the compressions favor certain nodes, a pointer-based radix sort as a replacement for table-based methods, and a more careful partitioning of a tree into easily managed parts. Our algorithms compute nearest common ancestors off-line, verify and construct minimum spanning trees, do interval analysis on a flowgraph, find the dominators of a flowgraph, and build the component tree of a weighted tree.
منابع مشابه
On Rotations and the Generation of Binary Trees
The rotation graph, G n , has vertex set consisting of all binary trees with n nodes. Two vertices are connected by an edge if a single rotation will transform one tree into the other. We provide a simpler proof of a result of Lucas 7] that G n contains a Hamilton path. Our proof deals directly with the pointer representation of the binary tree. This proof provides the basis of an algorithm for...
متن کاملTwo Linear Time Algorithms for Mst on Minor Closed Graph Classes
This article presents two simple deterministic algorithms for finding the Minimum Spanning Tree in O(|V |+ |E|) time for any non-trivial class of graphs closed on graph minors. This applies in particular to planar graphs and graphs of bounded genus. Both algorithms run on a pointer machine and they require no a priori knowledge of the structure of the class except for its density. Edge weights ...
متن کاملLinear-time algorithms to color topological graphs
We describe a linear-time algorithm for 4-coloring planar graphs. We indeed give an O(V + E + |χ| + 1)-time algorithm to C-color V -vertex E-edge graphs embeddable on a 2-manifold M of Euler characteristic χ where C(M) is given by Heawood’s (minimax optimal) formula. Also we show how, in O(V + E) time, to find the exact chromatic number of a maximal planar graph (one with E = 3V − 6) and a colo...
متن کاملChordal Graphs and Semidefinite Optimization
Chordal graphs play a central role in techniques for exploiting sparsity in large semidefinite optimization problems and in related convex optimization problems involving sparse positive semidefinite matrices. Chordal graph properties are also fundamental to several classical results in combinatorial optimization, linear algebra, statistics, signal processing, machine learning, and nonlinear op...
متن کاملA New ILP Model for Identical Parallel-Machine Scheduling with Family Setup Times Minimizing the Total Weighted Flow Time by a Genetic Algorithm
This paper presents a novel, integer-linear programming (ILP) model for an identical parallel-machine scheduling problem with family setup times that minimizes the total weighted flow time (TWFT). Some researchers have addressed parallel-machine scheduling problems in the literature over the last three decades. However, the existing studies have been limited to the research of independent jobs,...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998